package com.iplant.basic.service.po.fmc;

import com.iplant.base.po.BasePO;
import com.iplant.base.utils.annotation.po.DBBasePO;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.join.DBJoin;

import java.io.Serializable;
import java.util.Calendar;

/**
 * 不可用记录
 */
@DBBasePO(TableName = "fmc_unavaliable", Code = false, CheckName = {"Code"}, CodeAuto = true, CodePrefix = "FUB-{yyMM}-")
public class FMCUnavailable extends BasePO implements Serializable {

    @DBCondition
    @DBField
    public int StationID = 0;
    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Name", tableName = "fmc_station", tableAsName = "s1", MainTableField = "StationID")
    public String StationName = "";

    @DBJoin(name = "Code", tableName = "fmc_station", tableAsName = "s1", MainTableField = "StationID")
    public String StationCode = "";


    @DBCondition
    @DBField
    public int WorkAreaID = 0;
    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Name", tableName = "fmc_workarea", tableAsName = "w2", MainTableField = "WorkAreaID")
    public String WorkAreaName = "";

    @DBJoin(name = "Code", tableName = "fmc_workarea", tableAsName = "w2", MainTableField = "WorkAreaID")
    public String WorkAreaCode = "";


    @DBCondition
    @DBField
    public int WorkshopID = 0;
    @DBJoin(name = "Name", tableName = "fmc_workshop", tableAsName = "w1", JoinIndex = 2, MainTableField = "WorkshopID")
    public String WorkshopName = "";
    @DBJoin(name = "Code", tableName = "fmc_workshop", tableAsName = "w1", JoinIndex = 2, MainTableField = "WorkshopID")
    public String WorkshopCode = "";

    @DBCondition
    @DBField
    public int FactoryID = 0;

    @DBJoin(name = "Code", tableName = "fmc_factory", tableAsName = "f1", JoinIndex = 3, MainTableField = "FactoryID")
    public String FactoryCode = "";

    @DBJoin(name = "Name", tableName = "fmc_factory", tableAsName = "f1", JoinIndex = 3, MainTableField = "FactoryID")
    public String FactoryName = "";

    @DBCondition(CompareType = DBCondition.DBCompareType.lt,ParamName = "EndTime")
    @DBField
    public Calendar StartTime = Calendar.getInstance();
    @DBCondition(CompareType = DBCondition.DBCompareType.gt,ParamName = "StartTime")
    @DBField
    public Calendar EndTime = Calendar.getInstance();


}
